package bishi;

import java.util.ArrayList;
import java.util.Scanner;

/**
 * @Author liuhaoqi
 * @Date 2020/9/12 19:38
 * @Version 1.0
 */
public class JianSheYinHang01 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s1 = scanner.nextLine();
        String s2 = scanner.nextLine();
        String[] s3 = s1.replaceAll("\"","").split(" ");
        String[] s4 = s2.replaceAll("\"","").split(" ");
        for (int i = 0; i < s3.length; i++) {
            for (int j = 0; j < s4.length; j++) {
                if (s4[j].equals(s3[i])) {
                    s3[i] = "";
                    s4[j] = "";
                }
            }
        }
        ArrayList<String> list = new ArrayList<>();
        for (int i = 0; i < s3.length; i++) {
            if (!s3[i].equals("")) {
                list.add(s3[i]);
            }
        }
        for (int i = 0; i < s3.length; i++) {
            if (!s4[i].equals("")) {
                list.add(s4[i]);
            }
        }
        System.out.println(list.toString());
    }
}
